using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._WorkflowManagerTools._Configuration
{
    /// <summary>
    /// <para>Publish Workflow Service</para>
    /// <para>Uploads and shares a workflow service and a map service of job locations for an ArcGIS Workflow Manager (Classic) repository.</para>
    /// <para>上传和共享 ArcGIS Workflow Manager （Classic） 资料档案档案库的工作流服务和作业位置地图服务。</para>
    /// </summary>    
    [DisplayName("Publish Workflow Service")]
    public class PublishWorkflowService : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PublishWorkflowService()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_service_name">
        /// <para>Service Name</para>
        /// <para>The name of the workflow service that will be uploaded and shared.</para>
        /// <para>将上载和共享的工作流服务的名称。</para>
        /// </param>
        /// <param name="_aoi_service_name">
        /// <para>AOI Service Name</para>
        /// <para>The name of the map service that will be uploaded and shared.</para>
        /// <para>将上传和共享的地图服务的名称。</para>
        /// </param>
        /// <param name="_server">
        /// <para>Server</para>
        /// <para>The ArcGIS Server connection file (.ags) that contains the information needed to connect to ArcGIS Server or the URL to the ArcGIS Enterprise portal federated server.</para>
        /// <para>ArcGIS Server 连接文件 （.ags），其中包含连接到 ArcGIS Server 所需的信息或 ArcGIS Enterprise 门户联合服务器的 URL。</para>
        /// </param>
        /// <param name="_out_service_draft_location">
        /// <para>Output Service Draft Location</para>
        /// <para>The folder where service definitions will be saved.</para>
        /// <para>将保存服务定义的文件夹。</para>
        /// </param>
        public PublishWorkflowService(object _service_name, object _aoi_service_name, object _server, object _out_service_draft_location)
        {
            this._service_name = _service_name;
            this._aoi_service_name = _aoi_service_name;
            this._server = _server;
            this._out_service_draft_location = _out_service_draft_location;
        }
        public override string ToolboxName => "Workflow Manager Tools";

        public override string ToolName => "Publish Workflow Service";

        public override string CallName => "wmx.PublishWorkflowService";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_service_name, _aoi_service_name, _server, _out_service_draft_location, _input_database_path, _server_folder, _description, _output_workflow_service_draft_path, _output_map_service_draft_path];

        /// <summary>
        /// <para>Service Name</para>
        /// <para>The name of the workflow service that will be uploaded and shared.</para>
        /// <para>将上载和共享的工作流服务的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Service Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _service_name { get; set; }


        /// <summary>
        /// <para>AOI Service Name</para>
        /// <para>The name of the map service that will be uploaded and shared.</para>
        /// <para>将上传和共享的地图服务的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("AOI Service Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _aoi_service_name { get; set; }


        /// <summary>
        /// <para>Server</para>
        /// <para>The ArcGIS Server connection file (.ags) that contains the information needed to connect to ArcGIS Server or the URL to the ArcGIS Enterprise portal federated server.</para>
        /// <para>ArcGIS Server 连接文件 （.ags），其中包含连接到 ArcGIS Server 所需的信息或 ArcGIS Enterprise 门户联合服务器的 URL。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Server")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _server { get; set; }


        /// <summary>
        /// <para>Output Service Draft Location</para>
        /// <para>The folder where service definitions will be saved.</para>
        /// <para>将保存服务定义的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Service Draft Location")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_service_draft_location { get; set; }


        /// <summary>
        /// <para>Input Database Path (.jtc)</para>
        /// <para><xdoc>
        ///   <para>The workflow connection file (.jtc) that contains the information needed to connect to the Workflow Manager (Classic) repository.</para>
        ///   <para>The workflow connection in your ArcGIS Pro project will be used if a workflow connection file is not defined.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>工作流连接文件 （.jtc），其中包含连接到 Workflow Manager （Classic） 资料档案库所需的信息。</para>
        ///   <para>如果未定义工作流连接文件，则将使用 ArcGIS Pro 工程中的工作流连接。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path (.jtc)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _input_database_path { get; set; } = null;


        /// <summary>
        /// <para>Server Folder</para>
        /// <para><xdoc>
        ///   <para>The folder to which the services will be published on ArcGIS Server.</para>
        ///   <para>If a folder is not specified, the services will be published to the root folder of ArcGIS Server.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将在 ArcGIS Server 上将服务发布到的文件夹。</para>
        ///   <para>如果未指定文件夹，则服务将发布到 ArcGIS Server 的根文件夹。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Server Folder")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _server_folder { get; set; } = null;


        /// <summary>
        /// <para>Description</para>
        /// <para>A description of the services that will be published.</para>
        /// <para>将要发布的服务的说明。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Description")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _description { get; set; } = null;


        /// <summary>
        /// <para>Output Workflow Service Path (*.sddraft)</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Workflow Service Path (*.sddraft)")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_workflow_service_draft_path { get; set; }


        /// <summary>
        /// <para>Output Map Service Path (*.sddraft)</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Map Service Path (*.sddraft)")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output_map_service_draft_path { get; set; }


        public PublishWorkflowService SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}